package com.ianmoone.JZOF;

import java.util.Scanner;

public class ZHTest {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String nextLine = in.nextLine();
		int H = in.nextInt();
		String[] split = nextLine.split(" ");
		int num = 0;
		int i;
		for (i = 1;; i++) {
			num = 0;
			for (int j = 0; j < split.length; j++) {
				int n = Integer.valueOf(split[j]);
				int mod = n % i;
				if (mod==0) {
					num += n/i;
				}else {
					num += n/i+1;
				}
			}
			if (num<=H) {
				break;
			}
		}
		System.out.println(i);
	}
}
